$(function(){
	selallright();
});

//查找所有我的应用
function selallright(){	
	var username = $.session.get("username");
    var secretkey = $.session.get("user_secretkey");
	var admininfo_id = $.session.get("userid");
	console.log(",,,"+username + "','" + secretkey + "','"+admininfo_id);
	$.ajax({
		url: "../../../service",
		cache : false,
		async:false,
		data : {
			proc : "c_admin.find_allyy",
			para : "['" + username + "','" + secretkey + "','"+admininfo_id +"']"
		},
		dataType : "json",
		success : function(data) {
		console.log(JSON.stringify(data));
			if(JSON.stringify(data)!='[]'){
				if (data[0].TAG == "1") {
					top.layer.alert("",function(index){
						window.location.href="login.html";
						layer.close(index);
					});
				}else if(data[0].msg=='读取接口失败,参数错误'||data.msg=='读取接口失败,参数错误'){
					top.layer.msg("系统错误!");
				}else{
					$("#yy").html("");
					var lidata="";
					for(var i=0;i<=data.length-1;i++){
						if(data[i].IS_ON==0){
							//大转盘~整点秒杀
							lidata ='<div class="width33">'+
									'<a onclick="unabled()"><div class="border_gray padding20 margin10">'+
									'<img src="../../'+data[i].SICON+'" height="70px"/>&nbsp;&nbsp;<span><b class="font_size15">'+data[i].SNAME+'<br/><font>版本：'+data[i].VERSION_NUMBER+'</font></b></span>'+
									'</div></a>'+
									'</div>';			
						}else{					
							lidata = '<div class="width33">'+
							'<a href="'+data[i].SURL+'"><div class="border_gray padding20 margin10">	'+
							'<img src="../../'+data[i].SICON+'" height="70px"/>&nbsp;&nbsp;<span><b class="font_size15">'+data[i].SNAME+'<br/><font>版本：'+data[i].VERSION_NUMBER+'</font></b></span>'+
							'</div></a>'+
							'</div>';
						 
						}
						 $("#yy").append(lidata);	  
								 
					}
				}
			}
			
		}
	});			
} 







